package com.lst.demo.preview;

import android.os.Bundle;
import android.view.View;

import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.PathUtils;
import com.lst.demo.R;
import com.previewlibrary.GPreviewActivity;

public class MyPreviewActivity extends GPreviewActivity {
    @Override
    public int setContentLayout() {
        return R.layout.activity_mypreview;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        Bundle bundle = this.getIntent().getExtras();
        final String url = bundle.getString("url");

        LogUtils.i("预览图片:" + url);
        String rootPath = PathUtils.getRootPath();
        String externalStoragePath = PathUtils.getExternalStoragePath();
        LogUtils.i("rootpath:" + rootPath);
        LogUtils.i("externalStoragePath:" + externalStoragePath);

        findViewById(R.id.tv_save).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {



                SaveNetPhotoUtils.savePhoto(MyPreviewActivity.this, url);
            }
        });
    }
}
